An Open Software Gateway initiative (OSGi) technique, a core of which is an OSGi framework, has been developed in a computer field. The OSGi framework is a modular system and service platform for a Java programming language, which is installed on an Operating System (OS) and realizes a complete and dynamic component model. The OSGi framework has been widely used for establishing infrastructures for enterprise-level applications because of its advantages of being easy to be reused, low development complexity, and so on.
A plurality of virtual machines, which form a cluster (or called workload), can be deployed on the OSGi framework. An OSGi application may be installed and executed on each of the virtual machines. The OSGi application comprises one or more modules. Generally, an entire OSGi application is deployed on one virtual machine, and when the application is executed, respective modules of the application consume resources of the virtual machine, e.g. CPU resources, memory resources, disk resources, network resources and the like, so as to perform corresponding functions.
With the development of the OSGi application (especially the enterprise-level application), there are more and more modules in the OSGi application, such that a size of the OSGi application becomes larger. The OSGi application with an over-large size not only has problems of starting and running slowly, having unstable runtime, having difficulty in finding errors and in deployment, and the like, but also may consume resources of the virtual machine executing the application significantly, so that the virtual machine is exhausted. At the same time, although other virtual machines in the cluster to which the virtual machine belongs have a lot of available resources, the available resources are in an idle state because these virtual machines do not execute applications. This renders that workloads of the respective virtual machines are unbalanced.